/* 管理页面公共样式 */

/* 主题色彩变量 */
:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --primary-gradient-hover: linear-gradient(135deg, #5a6fd8, #6a4190);
  --glass-bg: rgba(255, 255, 255, 0.95);
  --glass-blur: blur(10px);
  --card-radius: 16px;
  --button-radius: 12px;
  --table-radius: 12px;
  --shadow-light: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-heavy: 0 8px 32px rgba(0, 0, 0, 0.1);
  --primary-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
  --primary-shadow-hover: 0 6px 20px rgba(102, 126, 234, 0.4);
  --text-gradient: linear-gradient(135deg, #667eea, #764ba2);
}

/* 页面容器基础样式 */
.management-container {
  min-height: 100vh;
  background: var(--primary-gradient);
  padding: 24px;
}

/* 页面头部样式 */
.page-header {
  margin-bottom: 24px;
  animation: fadeInDown 0.6s ease-out;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border-radius: var(--card-radius);
  padding: 24px 32px;
  box-shadow: var(--shadow-heavy);
}

.header-left {
  flex: 1;
}

.page-title {
  display: flex;
  align-items: center;
  margin: 0 0 8px 0;
  font-size: 28px;
  font-weight: 600;
  color: #2c3e50;
  background: var(--text-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.title-icon {
  margin-right: 12px;
  color: #667eea;
}

.page-description {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  /* 不能换行*/
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-actions {
  display: flex;
  gap: 12px;
}

/* 按钮样式 */
.primary-btn,
.add-btn {
  background: var(--primary-gradient);
  border: none;
  border-radius: var(--button-radius);
  padding: 0 24px;
  height: 44px;
  font-weight: 500;
  box-shadow: var(--primary-shadow);
  transition: all 0.3s ease;
  color: white;
}

.primary-btn:hover,
.add-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--primary-shadow-hover);
  background: var(--primary-gradient-hover);
}

.delete-btn {
  border-radius: var(--button-radius);
  padding: 0 24px;
  height: 44px;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
  transition: all 0.3s ease;
}

.delete-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

/* 卡片样式 */
.glass-card,
.search-card,
.table-card {
  border-radius: var(--card-radius);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-light);
  animation: fadeInUp 0.6s ease-out;
}

.search-card {
  margin-bottom: 24px;
}

.search-form {
  padding: 8px;
}

.search-input {
  width: 200px;
}

/* 表格样式 */
.data-table,
.user-table,
.task-table,
.log-table {
  border-radius: var(--table-radius);
}

/* 动画定义 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 响应式设计 */
@media (max-width: 768px) {
  .management-container {
    padding: 16px;
  }
  
  .header-content {
    flex-direction: column;
    gap: 16px;
    padding: 20px;
  }
  
  .page-title {
    font-size: 24px;
  }
  
  .search-input {
    width: 100%;
  }
}

/* 表格行悬停效果 */
.n-data-table-tbody .n-data-table-tr:hover {
  background-color: rgba(102, 126, 234, 0.05);
}

/* 全局按钮样式覆盖 */
.n-button--primary-type {
  background: var(--primary-gradient) !important;
  border: none !important;
}

.n-button--primary-type:hover {
  background: var(--primary-gradient-hover) !important;
}
